package cn.wonderland.house.service.impl;

import cn.wonderland.house.domain.ContractInformation;
import cn.wonderland.house.mapper.ContractInformationMapper;
import cn.wonderland.house.service.IContractInformationService;
import cn.wonderland.basic.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 合同信息表 服务实现类
 * </p>
 *
 * @author wonderland
 * @since 2023-04-26
 */
@Service
public class ContractInformationServiceImpl extends BaseServiceImpl<ContractInformation> implements IContractInformationService {

    @Autowired
    private ContractInformationMapper mapper;

    @Override
    public void add(ContractInformation contractInformation) {
        contractInformation.setCtStatus(4);
        mapper.add(contractInformation);
    }

    @Override
    public void updateStateToOff(Long hId) {
        mapper.updateStateToOff(hId);
    }

    @Override
    public ContractInformation findByHouseId(Long hId) {
        return mapper.findByHouseId(hId);
    }
}
